//logs.js
const util = require('../../utils/util.js')
const { $Toast } = require('../../dist/base/index');
var api = require('../../config/api.js');
const app = getApp();

Page({
  data: {
    loading:false,
    data:null
    /*表单参数*/
  },
  onLoad: function (options) {
    console.log(options.id);
    let self = this; 
    util.request(`${api.GetSolicitDmtDetail}?id=${options.id}`, {
    }, 'POST').then(res => {
      if (res.success) {
        self.setData({
          data: res.data
        })
      }
    }).catch(err => {

    });
  },

  onShow: function () {
  },

  review(e){
    let id = this.data.data.id;
    let agreeis = e.currentTarget.dataset.agreeis
    util.request(`${api.ReviewSolicitDmt}?id=${id}&agreeIs=${agreeis}`, {
    }, 'POST').then(res => {
      if (res.success) {
        wx.navigateBack();
      }
    }).catch(err => {

    });
  }

})
